package cn.jtfadmin.base.lang.common.domain.dto;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * 特殊查询参数
 *
 * @author akfh
 * @since 1.0
 */
@Getter
@Setter
@ToString
public class SpecPDTO<T> implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    /**
     * 查询参数json对象字符穿需要urlencode,[{type:"eq, ge, gt, le, lt, like, likeLeft, likeRight, isNull, notNull,
     * * isEmpty(string/collection), notEmpty(string/collection),
     * * isEmptyOrNull(string/collection), notEmptyOrNull(string/collection)", column:"", value:""}...]
     */
    private String specJson;


    /**
     * 拍序列
     */
    private String column;

    /**
     * 排序方向 desc/asc
     */
    private String order;

    public SpecPDTO() {
    }

    public SpecPDTO(String specJson) {
        this.specJson = specJson;
    }

    public SpecPDTO(String column, String order) {
        this.column = column;
        this.order = order;
    }

    public SpecPDTO(String specJson, String column, String order) {
        this.specJson = specJson;
        this.column = column;
        this.order = order;
    }
}
